<%--
  Created by IntelliJ IDEA.
  User: Elle
  Date: 2023/5/17
  Time: 10:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--分页--%>
<%--<c:set var="currentPage" value="1" scope="page"/>--%>
<%--<c:set var="totalPage" value="4" scope="page"/>--%>
<%--<c:set var="totalSize" value="20" scope="page"/>--%>
<div>
    ${currentPage}/${totalPage}&nbsp;&nbsp;，共${totalSize}条数据
    <a href="javascript:page(1)">首页</a>
    <a href="javascript:page( ${currentPage-1})">上一页</a>
    <a href="javascript:page( ${currentPage+1})">下一页</a>
    <a href="javascript:page(${totalPage})">尾页</a>
</div>
<script>
    function page(pageIndex){
        $("#myform>[name=currentPage]").val(pageIndex); //修改表单中当前页的数据
        //页面跳转
        $("#myform").submit();//提交待条件的分页请求
    }
</script>